Optimal. Leaf size=39 \[ \sqrt {a+\frac {b}{x}} x+\frac {b \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {248, 43, 65,
214} \begin {gather*} x \sqrt {a+\frac {b}{x}}+\frac {b \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 65
Rule 214
Rule 248
Rubi steps
\begin {align*} \int \sqrt {a+\frac {b}{x}} \, dx &=-\text {Subst}\left (\int \frac {\sqrt {a+b x}}{x^2} \, dx,x,\frac {1}{x}\right )\\ &=\sqrt {a+\frac {b}{x}} x-\frac {1}{2} b \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right )\\ &=\sqrt {a+\frac {b}{x}} x-\text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+\frac {b}{x}}\right )\\ &=\sqrt {a+\frac {b}{x}} x+\frac {b \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 39, normalized size = 1.00 \begin {gather*} \sqrt {a+\frac {b}{x}} x+\frac {b \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(73\) vs.
\(2(31)=62\).
time = 0.02, size = 74, normalized size = 1.90
method | result | size |
risch | \(x \sqrt {\frac {a x +b}{x}}+\frac {b \ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right ) \sqrt {\frac {a x +b}{x}}\, \sqrt {x \left (a x +b \right )}}{2 \sqrt {a}\, \left (a x +b \right )}\) | \(72\) |
default | \(\frac {\sqrt {\frac {a x +b}{x}}\, x \left (2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+b \ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right )\right )}{2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}}\) | \(74\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 50, normalized size = 1.28 \begin {gather*} \sqrt {a + \frac {b}{x}} x - \frac {b \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right )}{2 \, \sqrt {a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.50, size = 99, normalized size = 2.54 \begin {gather*} \left [\frac {2 \, a x \sqrt {\frac {a x + b}{x}} + \sqrt {a} b \log \left (2 \, a x + 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right )}{2 \, a}, \frac {a x \sqrt {\frac {a x + b}{x}} - \sqrt {-a} b \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a x + b}{x}}}{a}\right )}{a}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.92, size = 42, normalized size = 1.08 \begin {gather*} \sqrt {b} \sqrt {x} \sqrt {\frac {a x}{b} + 1} + \frac {b \operatorname {asinh}{\left (\frac {\sqrt {a} \sqrt {x}}{\sqrt {b}} \right )}}{\sqrt {a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 64 vs.
\(2 (31) = 62\).
time = 1.50, size = 64, normalized size = 1.64 \begin {gather*} -\frac {b \log \left ({\left | -2 \, {\left (\sqrt {a} x - \sqrt {a x^{2} + b x}\right )} \sqrt {a} - b \right |}\right ) \mathrm {sgn}\left (x\right )}{2 \, \sqrt {a}} + \frac {b \log \left ({\left | b \right |}\right ) \mathrm {sgn}\left (x\right )}{2 \, \sqrt {a}} + \sqrt {a x^{2} + b x} \mathrm {sgn}\left (x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.08, size = 58, normalized size = 1.49 \begin {gather*} x\,\sqrt {a\,x^2+b\,x}\,\sqrt {\frac {1}{x^2}}+\frac {b\,x\,\ln \left (\frac {\frac {b}{2}+a\,x+\sqrt {a}\,\sqrt {a\,x^2+b\,x}}{\sqrt {a}}\right )\,\sqrt {\frac {1}{x^2}}}{2\,\sqrt {a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________